/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.rbh.risk.service.impl;

import com.rbh.risk.dao.RiskDataDao;
import com.rbh.risk.entity.Profile;
import com.rbh.risk.entity.RiskData;
import com.rbh.risk.entity.SeverityLevel;
import com.rbh.risk.entity.Workgroup;
import com.rbh.risk.model.SummaryLevelModel;
import com.rbh.risk.model.TopReportModel;
import com.rbh.risk.service.ReportService;
import java.util.Date;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service("reportService")
public class ReportServiceImpl implements ReportService {

    @Autowired
    private RiskDataDao riskDataDao;

    @Transactional(readOnly = true)
    @Override
    public List<TopReportModel> getTopReport(Integer limit) {
        if (limit != null) {
            return this.riskDataDao.getTopReport(limit);
        } else {
            return this.riskDataDao.getTopReport();
        }
    }

    @Transactional(readOnly = true)
    @Override
    public List<SummaryLevelModel> getSummaryDepartmentLevel(Workgroup workgroup, Profile profile, Date from, Date to) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Transactional(readOnly = true)
    @Override
    public List<SummaryLevelModel> getSummaryDivisionLevel(Profile profile, Date from, Date to) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Transactional(readOnly = true)
    @Override
    public List<RiskData> getSummaryDetail(Workgroup workgroup, SeverityLevel level, Date from, Date to) {
        throw new UnsupportedOperationException("Not supported yet.");
    }
}
